package io.github.chutian0610.sqlparser.token

sealed class SymbolEnum(open val text: String) {
    data object Comma : SymbolEnum(",")
    data object DoubleEq : SymbolEnum("==")
    data object Spaceship : SymbolEnum("<=>")
    data object Eq : SymbolEnum("=")
    data object NEq : SymbolEnum("<>")

    /**
     * Work in some dialect
     */
    data object NEqAlias : SymbolEnum("!=")
    data object Lt : SymbolEnum("<")
    data object Gt : SymbolEnum(">")
    data object LtEq : SymbolEnum("<=")
    data object GtEq : SymbolEnum(">=")
    data object Tilde : SymbolEnum("~")
    data object TildeEq : SymbolEnum("~=")
    data object Plus : SymbolEnum("+")
    data object Minus : SymbolEnum("-")
    data object Mul : SymbolEnum("*")
    data object Div : SymbolEnum("/")
    data object Mod : SymbolEnum("%")
    data object StringConcat : SymbolEnum("||")
    data object LParen : SymbolEnum("(")
    data object RParen : SymbolEnum(")")
    data object LBracket : SymbolEnum("[")
    data object RBracket : SymbolEnum("]")
    data object LBrace : SymbolEnum("{")
    data object RBrace : SymbolEnum("}")
    data object Period : SymbolEnum(".")
    data object Colon : SymbolEnum(":")
    data object DoubleColon : SymbolEnum("::")
    data object Semicolon : SymbolEnum(";")
    data object Assignment : SymbolEnum(":=")
    data object Backslash : SymbolEnum("\\")
    data object Ampersand : SymbolEnum("&")
    data object Overlap : SymbolEnum("&&")
    data object Caret : SymbolEnum("^")
    data object Pipe : SymbolEnum("|")
    data object RArrow : SymbolEnum("=>")
    data object Sharp : SymbolEnum("#")
    data object DoubleSharp : SymbolEnum("##")
    data object AtSign : SymbolEnum("@")
    data object AtAt : SymbolEnum("@@")
    data object CaretAt : SymbolEnum("^@")
    data object ShiftLeft : SymbolEnum("<<")
    data object ShiftRight : SymbolEnum(">>")
    data object Arrow : SymbolEnum("->")
    data object LongArrow : SymbolEnum("->>")
    data object Question : SymbolEnum("?")

    /**
     * a square root math operator in PostgreSQL
     */
    data object PGSquareRoot : SymbolEnum(text = "|/")

    /**
     * a cube root math operator in PostgreSQL
     */
    data object PGCubeRoot : SymbolEnum(text = "||/")

    /**
     * PostgreSQL geometrical binary operator (Does not extend below?)`
     */
    data object VerticalBarAmpersandRightAngleBracket : SymbolEnum(text = "|&>")

    /**
     * PostgreSQL/Redshift geometrical binary operator (Is strictly above?)
     */
    data object VerticalBarShiftRight : SymbolEnum(text = "|>>")

    /**
     * BigQuery pipe operator
     */
    data object VerticalBarRightAngleBracket : SymbolEnum(text = "|>")

    /**
     * Exclamation Mark `!` used for PostgreSQL factorial operator
     */
    data object ExclamationMark : SymbolEnum(text = "!")

    /**
     * Double Exclamation Mark `!!` used for PostgreSQL prefix factorial operator
     */
    data object DoubleExclamationMark : SymbolEnum(text = "!!")

    /**
     * a case insensitive not match regular expression operator in PostgreSQL
     */
    data object ExclamationMarkTildeAsterisk : SymbolEnum(text = "!~*")

    /**
     * a case sensitive not match regular expression operator in PostgreSQL
     */
    data object ExclamationMarkTilde : SymbolEnum(text = "!~")

    /**
     * a case insensitive not match pattern operator in PostgreSQL
     */
    data object ExclamationMarkDoubleTildeAsterisk : SymbolEnum(text = "!~~*")

    /**
     * a case sensitive not match pattern operator in PostgreSQL
     */
    data object ExclamationMarkDoubleTilde : SymbolEnum(text = "!~~")

    /**
     * a case insensitive match pattern operator in PostgreSQL
     */
    data object DoubleTildeAsterisk : SymbolEnum(text = "~~*")

    /**
     * a case sensitive match pattern operator in PostgreSQL
     */
    data object DoubleTilde : SymbolEnum(text = "~~")

    /**
     * a case insensitive match regular expression operator in PostgreSQL
     */
    data object TildeAsterisk : SymbolEnum(text = "~*")

    /**
     * PostgreSQL/Redshift geometrical binary operator (Is strictly below?)
     */
    data object ShiftLeftVerticalBar : SymbolEnum(text = "<<|")

    /**
     * `<->` PostgreSQL/Redshift geometrical binary operator (Distance between)
     */
    data object TwoWayArrow : SymbolEnum(text = "<->")

    /**
     * PostgreSQL/Redshift geometrical binary operator (Is below?)
     */
    data object LeftAngleBracketCaret : SymbolEnum(text = "<^")

    /**
     * jsonb <@ jsonb -> boolean: Test whether right json contains the left json
     */
    data object ArrowAt : SymbolEnum(text = "<@")

    /**
     * PostgreSQL/Redshift geometrical binary operator (Is above?)
     */
    data object RightAngleBracketCaret : SymbolEnum(text = ">^")

    /**
     * PostgreSQL/Redshift geometrical binary operator (Overlaps to right?)`
     */
    data object AmpersandRightAngleBracket : SymbolEnum(text = "&>")

    /**
     * PostgreSQL/Redshift geometrical binary operator (Does not extend above?)`
     */
    data object AmpersandLeftAngleBracketVerticalBar : SymbolEnum(text = "&<|")

    /**
     * PostgreSQL/Redshift geometrical binary operator (Overlaps to left?)
     */
    data object AmpersandLeftAngleBracket : SymbolEnum(text = "&<")

    /**
     * jsonb #- text[] -> jsonb: Deletes the field or array element at the specified
     * path, where path elements can be either field keys or array indexes.
     */
    data object HashMinus : SymbolEnum(text = "#-")

    /**
     * extracts JSON sub-object at the specified path
     */
    data object HashArrow : SymbolEnum(text = "#>")

    /**
     *  extracts JSON sub-object at the specified path as text
     */
    data object HashLongArrow : SymbolEnum(text = "#>>")

    /**
     *`@-@` PostgreSQL/Redshift geometrical unary operator (Length or circumference)
     */
    data object AtDashAt : SymbolEnum("@-@")

    /**
     * jsonb @> jsonb -> boolean: Test whether left json contains the right json
     */
    data object AtArrow : SymbolEnum("@>")

    /**
     * jsonb @? jsonpath -> boolean: Does JSON path return any item for the specified  JSON value?
     */
    data object AtQuestion : SymbolEnum("@?")

    /**
     * `?-` PostgreSQL/Redshift geometrical unary/binary operator (Is horizontal?/Are horizontally aligned?)
     */
    data object QuestionMarkDash : SymbolEnum("?-")

    /*
     * `?#` PostgreSQL/Redshift geometrical binary operator (Intersects or overlaps)
     */
    data object QuestionMarkSharp : SymbolEnum("?#")

    /**
     * `?-|` PostgreSQL/Redshift geometrical binary operator (Is perpendicular?)
     */
    data object QuestionMarkDashVerticalBar : SymbolEnum("?-|")

    /**
     * `?||` PostgreSQL/Redshift geometrical binary operator (Are parallel?)
     */
    data object QuestionMarkDoubleVerticalBar : SymbolEnum("?||")

    /**
     * jsonb ?| text[] -> boolean: Check whether any member of the text array exists as top-level keys within the jsonb object
     */
    data object QuestionPipe : SymbolEnum("?|")

    /**
     * jsonb ?& text[] -> boolean: Check whether all members of the text array exist as top-level keys within the jsonb object
     */
    data object QuestionAnd : SymbolEnum("?&")

    class CustomBinaryOperator(override val text: String) : SymbolEnum(text)
}